using System;

public struct Point // 值类型
{
    public int X;
    public int Y;
}

public class Circle // 引用类型
{
    public Point Center;

    public Circle(Point center)
    {
        Center = center;
    }

    public static void UpdatePoint(ref Point p, int newX, int newY)
    {
        p.X = newX;
        p.Y = newY;
    }

    public static void Main(string[] args)
    {
        // 使用示例
        Point p1 = new Point { X = 10, Y = 20 };
        Circle circle = new Circle(p1); // 引用类型

        Console.WriteLine($"Circle Center before update: {circle.Center.X}, {circle.Center.Y}"); // 输出: 10,20

        // 使用枚举
        ShapeType shape = ShapeType.Circle;
        Console.WriteLine($"Current shape: {shape}");

        // 修改值类型的属性
        UpdatePoint(ref p1, 15, 25); // 通过 ref 修改 Point 的值
        Console.WriteLine(p1.X + " " + p1.Y);
        Console.WriteLine($"Circle Center after update: {circle.Center.X}, {circle.Center.Y}"); // 仍然是10,20
    }
}

public enum ShapeType // 枚举
{
    Circle,
    Rectangle,
    Triangle
}
